<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        td{
            text-align:center;
        }
    </style>
</head>
<body>
    <table width="800" border="1">
        <tr>
            <th>ID</th>
            <th>姓名</th>
            <th>年龄</th>
            <th>邮箱</th>
            <th>操作</th>
        </tr>
        {% for au in authors %}

        <tr>
            <td>{{ au.id }}</td>
            <td>{{ au.name }}</td>
            <td>{{ au.age }}</td>
            <td>{{ au.email }}</td>
            <td>
                <button onclick="delAuthor({{ au.id }})">删除</button>
                <a href="/05-update/{{ au.id }}">修改</a>
            </td>



        </tr>
        {% endfor %}
    </table>
    <script>
        /*
        * 传递id到/09-delete/(\d+)
        * */
        function delAuthor(id) {
            location.href='/09-delete/'+id;

        }
    </script>
</body>
</html>